package com.gange.controller;

import com.gange.entity.Student;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

@RestController
public class DemoController {
    @GetMapping("/test")//设置请求方式只能是get请求
    public Map test(String name){
        Student student = new Student();
        System.out.println(name+"==================");
        //响应的数据
        Map map=new HashMap();
        map.put("a","zhangsan");
        map.put("b","20");
        return map;
    }
}
